/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nxlv2.nomad.businessobjects;

/**
 *
 * @author Xavier
 */
public class Contact {
    
    private int idBase, idAppli;
    private String nom;
    private String prenom;
    private String mail;
    private String tel;
    private boolean defaut;

    public Contact() {
    }
    
    /**
     * 
     * @param idBase
     * @param idAppli
     * @param nom
     * @param prenom
     * @param mail
     * @param tel
     * @param defaut 
     */
    public Contact(int idBase, int idAppli, String nom, String prenom, String mail, String tel, boolean defaut) {
        this.idBase = idBase;
        this.idAppli = idAppli;
        this.nom = nom;
        this.prenom = prenom;
        this.mail = mail;
        this.tel = tel;
        this.defaut = defaut;
    }

    /**
     * 
     * @return idBase
     */
    public int getIdBase() {
        return idBase;
    }

    /**
     * 
     * @param idBase 
     */
    public void setIdBase(int idBase) {
        this.idBase = idBase;
    }

    /**
     * 
     * @return idAppli
     */
    public int getIdAppli() {
        return idAppli;
    }

    /**
     * 
     * @param idAppli 
     */
    public void setIdAppli(int idAppli) {
        this.idAppli = idAppli;
    }
    
    /**
     * 
     * @return nom
     */
    public String getNom() {
        return nom;
    }
    /**
     * 
     * @param nom the nom to set
     */
    public void setNom(String nom) {
        this.nom = nom;
    }
    /**
     * 
     * @return prenom 
     */
    public String getPrenom() {
        return prenom;
    }
    /**
     * 
     * @param prenom the prenom to set
     */
    public void setPrenom(String prenom) {
        this.prenom = prenom;
    }
    /**
     * 
     * @return mail
     */
    public String getMail() {
        return mail;
    }
    
    /**
     * 
     * @param mail 
     */
    public void setMail(String mail) {
        this.mail = mail;
    }

    /**
     * 
     * @return tel
     */
    public String getTel() {
        return tel;
    }

    /**
     * 
     * @param tel 
     */
    public void setTel(String tel) {
        this.tel = tel;
    }

    /**
     * 
     * @return defaut
     */
    public boolean isDefaut() {
        return defaut;
    }

    /**
     * 
     * @param defaut 
     */
    public void setDefaut(boolean defaut) {
        this.defaut = defaut;
    }

    /**
     * 
     * @return String
     */
    @Override
    public String toString() {
        //return "Contact{" + "idBase=" + idBase + ", idAppli=" + idAppli + ", nom=" + nom + ", prenom=" + prenom + ", mail=" + mail + ", tel=" + tel + ", defaut=" + defaut + '}';
        return nom;
    }

    public String toJSONString(){
        return "{\"idBase\":\""+ idBase +"\",\"idAppli\":\""+ idAppli +"\",\"nom\":\""+ nom +"\",\"prenom\":\""+ prenom +"\",\"mail\":\""+ mail +"\",\"tel\":\""+ tel +"\",\"defaut\":\""+ defaut +"\"}";
    }
    
    
}
